From: Shannon Zhao Date: Thu, 7 Apr 2016 06:28:14 +0000 (+0800) Subject: xen/arm: map_dev_mmio_region: printk should be ratelimited X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1323 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:///%22http:/www.example.com/cgi/%22https:/?a=commitdiff_plain;h=c7445d8c8eb34ca97cd2a28cc9d874df40d94557;p=xen.git xen/arm: map_dev_mmio_region: printk should be ratelimited The function map_dev_mmio_region is used in a hypercall. Therefore all printks should be ratelimited to avoid a malicious guest flooding the console. Signed-off-by: Shannon Zhao Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Julien Grall --- diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 0011708bc8..db21433da7 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1284,7 +1284,7 @@ int map_dev_mmio_region(struct domain *d, res = map_mmio_regions(d, start_gfn, nr, mfn); if ( res < 0 ) { - printk(XENLOG_ERR "Unable to map [%#lx - %#lx] in Dom%d\n", + printk(XENLOG_G_ERR "Unable to map [%#lx - %#lx] in Dom%d\n", start_gfn, start_gfn + nr - 1, d->domain_id); return res; }